Public: Concord Software Projects : Updating to new DIY repository
This page last changed on Jul 25, 2008 by stepheneb.
I moved the DIY code to a new svn repository. It is now located here: DO NOT use this repository http://svn.concord.org/svn/teemss2/branches/diy_rails_2.0.2/ anymore. I exported r534 of this repository directory: Into this new subversion repository: If you have ssh commit access to concord you can use this svn path: svn+ssh://svn.concord.org/home/subversion/diy/trunk There is also a public github synch of the subversion repository here: If you have ssh commit access you can also grab a tar-gz archive of the intermediate git-svn clone here: and use it with the git-svn command to update and commit directly from git to svn. The new trac instance for the diy repository is here: The history of the changes are not in the new repository but hey are available in the old repository and trac. Because this is a brand new repository you can't use the svn switch command. I used this command to get a list of files present in the local working copy of my old diy_rails_2.0.2 that do not exist in the checkout from the new repository: diff -qr path/to/old/diy_rails_2.0.2 path/to/new/diy_rails_2.0.2 | egrep -v '(\.svn|\.DS_Store|\.rej|~$|\.tmp|\.log)' Most of them (like config/database.yml) I copied over. Here's how I converted a development DIY running from the older svn repository to using the newer repository. converting the dev udl diy to the new diy repository on otto
cd /web/rails.dev.concord.org
svn co file:///home/subversion/diy/trunk udl-trunk
look for files that are 'Only in udl' (that's the original DIY): diff -qr udl udl-trunk | egrep -v '(\.svn|\.DS_Store|\.rej|~$|\.tmp|\.log)' Files udl/app/controllers/reports_controller.rb and udl-trunk/app/controllers/reports_controller.rb differ Files udl/app/models/user.rb and udl-trunk/app/models/user.rb differ Files udl/app/views/users/new.rhtml and udl-trunk/app/views/users/new.rhtml differ Only in udl/config: database.yml Only in udl/config: environment.rb Only in udl/config: sds.yml Only in udl/db: schema.rb Only in udl/log: code.socket-0 Only in udl/log: code.socket-1 Only in udl/log: code.socket-2 Only in udl/log: code.socket-3 Files udl/README and udl-trunk/README differ Only in udl-trunk/test/fixtures: otrunk_report_templates.yml Only in udl-trunk/test/fixtures: reports.yml Only in udl-trunk/test/functional: otrunk_report_templates_controller_test.rb Only in udl-trunk/test/functional: reports_controller_test.rb Only in udl-trunk/test/unit: otrunk_report_template_test.rb Only in udl-trunk/test/unit: report_test.rb Only in udl/tmp: production.sql Only in udl/tmp: production.sql.new these are the only files that need to be copied cp udl/config/database.yml udl-trunk/config/database.yml cp udl/config/environment.rb udl-trunk/config/environment.rb cp udl/config/sds.yml udl-trunk/config/sds.yml cp udl/db/schema.rb udl-trunk/db/schema.rb now compare the latest environment.sample.rb with the one we just $ diff -u udl-trunk/config/environment.rb udl-trunk/config/environment.sample.rb --- udl-trunk/config/environment.rb 2008-05-28 20:44:58.000000000 -0400 +++ udl-trunk/config/environment.sample.rb 2008-07-25 13:29:09.000000000 -0400 @@ -16,10 +16,10 @@ end # This key is prefixed onto all the database tablenames. -RAILS_DATABASE_PREFIX = 'udl_' +RAILS_DATABASE_PREFIX = 'diy_' # This key is used to select the look and feel of the application -RAILS_APPLICATION_KEY = 'udl' +RAILS_APPLICATION_KEY = 'diy' Rails::Initializer.run do |config| # Settings in config/environments/* take precedence over those specified here. @@ -73,20 +73,28 @@ # see: http://api.rubyonrails.org/classes/ActionController/RequestForgeryProtection/ClassMethods.html#M000300 config.action_controller.allow_forgery_protection = false + # Before we add the gems unpacked into vendor/gems first see if there + # is a newer version of RedCloth installed and get it on the load path first. + begin + gem 'RedCloth', '> 3.0.4' + require 'redcloth' + rescue Gem::LoadError + # If this fails we'll use the RedCloth v3.0.4 in vendor/gems + end + # This adds any Gems that may have been unpacked into vendor/gems to the load path # see: http://errtheblog.com/posts/50-vendor-everything config.load_paths += Dir["#{RAILS_ROOT}/vendor/gems/**"].map do |dir| File.directory?(lib = "#{dir}/lib") ? lib : dir end - end # uncomment this line if this application is served from a directory with other rails applications -ActionController::AbstractRequest.relative_url_root = '/' + RAILS_DATABASE_PREFIX.chomp('_') +# ActionController::AbstractRequest.relative_url_root = '/' + RAILS_DATABASE_PREFIX.chomp('_') # If you are using a relative_url_root and running rails through a fcgi process set # this envirnment variable so that urls (like a background-image in css) have the # right path. This hack isn't needed when serving from mongrel. # See: http://inodes.org/blog/2007/04/04/mongrel-rails-and-the-theory-of-relativity/ -ENV['RAILS_RELATIVE_URL_ROOT'] = ActionController::AbstractRequest.relative_url_root +# ENV['RAILS_RELATIVE_URL_ROOT'] = ActionController::AbstractRequest.relative_url_root add what is needed – in this case it was just the section about the RedCloth gem make sure lighttpd can write to the log dir sudo chown apache:users udl-trunk/log sudo chmod 775 udl-trunk/log mv udl udl-backup mv udl-trunk udl now restart lighttpd |
Document generated by Confluence on Jan 27, 2014 16:52 |